Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Convert Prometheus floating point numbers correctly to int #2028

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Nov 20, 2024

Prometheus returns floats as strings, e.g., "16.5" is a valid idletime. This breaks the int() parsing since it can't handle floats as strings.

Prometheus returns floats as strings, e.g., `16.5` is a valid idletime.
This breaks the `int()` parsing since it can't handle floats as strings.
@MoritzWeber0 MoritzWeber0 requested a review from zusorio November 20, 2024 10:25
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.46%. Comparing base (5ff81fe) to head (756ddd8).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2028   +/-   ##
=======================================
  Coverage   85.46%   85.46%           
=======================================
  Files         225      225           
  Lines        7411     7411           
  Branches      513      513           
=======================================
  Hits         6334     6334           
  Misses        913      913           
  Partials      164      164           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

API Changelog 4.13.1.dev66+g4ec5ab4c

Copy link

This report was generated by comparing 4ec5ab4 with 5ff81fe.
If you would like to check difference, please check here.

success

ArtifactName: reg

✨✨ That's perfect, there is no visual difference! ✨✨

item count
pass 412
change 0
new 0
delete 0

@MoritzWeber0 MoritzWeber0 merged commit 3d8cc51 into main Nov 20, 2024
30 checks passed
@MoritzWeber0 MoritzWeber0 deleted the fix-idletimes branch November 20, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants